﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiWorldDrawImpl : OdGiWorldDraw_
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiWorldDrawImpl(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiWorldDrawImpl_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiWorldDrawImpl obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiWorldDrawImpl()
		{
			this.Dispose();
		}

		public new virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiWorldDrawImpl(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public virtual void setContext(OdGiContext pUserContext)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setContext(this.swigCPtr, OdGiContext.getCPtr(pUserContext));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static OdGiContext dummyGiContext()
		{
			OdGiContext result = (OdGiContext)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWorldDrawImpl_dummyGiContext(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual ushort color()
		{
			ushort result = GlobalsPINVOKE.OdGiWorldDrawImpl_color(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor trueColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiWorldDrawImpl_trueColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbStub layer()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_layer(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbStub lineType()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_lineType(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiFillType fillType()
		{
			OdGiFillType result = (OdGiFillType)GlobalsPINVOKE.OdGiWorldDrawImpl_fillType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual LineWeight lineWeight()
		{
			LineWeight result = (LineWeight)GlobalsPINVOKE.OdGiWorldDrawImpl_lineWeight(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double lineTypeScale()
		{
			double result = GlobalsPINVOKE.OdGiWorldDrawImpl_lineTypeScale(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double thickness()
		{
			double result = GlobalsPINVOKE.OdGiWorldDrawImpl_thickness(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual PlotStyleNameType plotStyleNameType()
		{
			PlotStyleNameType result = (PlotStyleNameType)GlobalsPINVOKE.OdGiWorldDrawImpl_plotStyleNameType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbStub plotStyleNameId()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_plotStyleNameId(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbStub material()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_material(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiMapper mapper()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_mapper(this.swigCPtr);
			OdGiMapper result = (intPtr == IntPtr.Zero) ? null : new OdGiMapper(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbStub visualStyle()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_visualStyle(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmTransparency transparency()
		{
			OdCmTransparency result = new OdCmTransparency(GlobalsPINVOKE.OdGiWorldDrawImpl_transparency(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual uint drawFlags()
		{
			uint result = GlobalsPINVOKE.OdGiWorldDrawImpl_drawFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool selectionGeom()
		{
			bool result = GlobalsPINVOKE.OdGiWorldDrawImpl_selectionGeom(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiSubEntityTraits.ShadowFlags shadowFlags()
		{
			OdGiSubEntityTraits.ShadowFlags result = (OdGiSubEntityTraits.ShadowFlags)GlobalsPINVOKE.OdGiWorldDrawImpl_shadowFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool sectionable()
		{
			bool result = GlobalsPINVOKE.OdGiWorldDrawImpl_sectionable(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiSubEntityTraits.SelectionFlags selectionFlags()
		{
			OdGiSubEntityTraits.SelectionFlags result = (OdGiSubEntityTraits.SelectionFlags)GlobalsPINVOKE.OdGiWorldDrawImpl_selectionFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor secondaryTrueColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiWorldDrawImpl_secondaryTrueColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDgLinetypeModifiers lineStyleModifiers()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiWorldDrawImpl_lineStyleModifiers(this.swigCPtr);
			OdGiDgLinetypeModifiers result = (intPtr == IntPtr.Zero) ? null : new OdGiDgLinetypeModifiers(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setTrueColor(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setTrueColor(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setPlotStyleName(PlotStyleNameType plotStyleNameType, OdDbStub pPlotStyleNameId)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setPlotStyleName__SWIG_0(this.swigCPtr, (int)plotStyleNameType, OdDbStub.getCPtr(pPlotStyleNameId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setPlotStyleName(PlotStyleNameType plotStyleNameType)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setPlotStyleName__SWIG_1(this.swigCPtr, (int)plotStyleNameType);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setColor(ushort color)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setColor(this.swigCPtr, color);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setLayer(OdDbStub layerId)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setLayer(this.swigCPtr, OdDbStub.getCPtr(layerId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setLineType(OdDbStub lineTypeId)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setLineType(this.swigCPtr, OdDbStub.getCPtr(lineTypeId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setFillType(OdGiFillType fillType)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setFillType(this.swigCPtr, (int)fillType);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setLineWeight(LineWeight lineWeight)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setLineWeight(this.swigCPtr, (int)lineWeight);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setLineTypeScale(double lineTypeScale)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setLineTypeScale(this.swigCPtr, lineTypeScale);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setThickness(double thickness)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setThickness(this.swigCPtr, thickness);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setSelectionMarker(IntPtr selectionMarker)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setSelectionMarker(this.swigCPtr, selectionMarker);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setMaterial(OdDbStub pMaterialId)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setMaterial(this.swigCPtr, OdDbStub.getCPtr(pMaterialId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setMapper(OdGiMapper pMapper)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setMapper(this.swigCPtr, OdGiMapper.getCPtr(pMapper));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setVisualStyle(OdDbStub visualStyleId)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setVisualStyle(this.swigCPtr, OdDbStub.getCPtr(visualStyleId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setTransparency(OdCmTransparency transparency)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setTransparency(this.swigCPtr, OdCmTransparency.getCPtr(transparency));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setDrawFlags(uint drawFlags)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setDrawFlags(this.swigCPtr, drawFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setSelectionGeom(bool bSelectionFlag)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setSelectionGeom(this.swigCPtr, bSelectionFlag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setShadowFlags(OdGiSubEntityTraits.ShadowFlags shadowFlags)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setShadowFlags(this.swigCPtr, (int)shadowFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setSectionable(bool bSectionableFlag)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setSectionable(this.swigCPtr, bSectionableFlag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setSelectionFlags(OdGiSubEntityTraits.SelectionFlags selectionFlags)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setSelectionFlags(this.swigCPtr, (int)selectionFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setSecondaryTrueColor(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setSecondaryTrueColor(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setLineStyleModifiers(OdGiDgLinetypeModifiers pLSMod)
		{
			GlobalsPINVOKE.OdGiWorldDrawImpl_setLineStyleModifiers(this.swigCPtr, OdGiDgLinetypeModifiers.getCPtr(pLSMod));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGiContext context()
		{
			OdGiContext result = (OdGiContext)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWorldDrawImpl_context(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isDragging()
		{
			bool result = GlobalsPINVOKE.OdGiWorldDrawImpl_isDragging(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGiSubEntityTraits subEntityTraits()
		{
			OdGiSubEntityTraits result = (OdGiSubEntityTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWorldDrawImpl_subEntityTraits(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGiGeometry rawGeometry()
		{
			OdGiGeometry result = (OdGiGeometry)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWorldDrawImpl_rawGeometry(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint numberOfIsolines()
		{
			uint result = GlobalsPINVOKE.OdGiWorldDrawImpl_numberOfIsolines(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
